ABC015 D - 高橋くんの苦悩
提出
code: python
w = int(input())
n, k = map(int, input().split())
print(ab)
dp = [-1 * (w+1) for _ in range(k+1)] 解答
code: python
w = int(input())
n, k = map(int, input().split())
# k枚使った時の重要度の最大値を保持
dp = [[0 * (w + 1) for _ in range(k + 1)] for _ in range(n)] for i in range(n):
for ki in range(1, k + 1):
for wi in range(w + 1):
# 幅, 重要度
if wi - a >= 0:
code: python
w = int(input())
n, k = map(int, input().split())
# k枚使った時の重要度の最大値を保持
dp = [0 * (w + 1) for _ in range(k + 1)] for i in range(n):
for ki in range(k, 0, -1):
for wi in range(w, -1, -1):
# 幅, 重要度
if wi - a >= 0:
テーマ
メモ